|
Eclipse Platform Pre-release 3.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.team.core.subscribers.RemoteSynchronizer
org.eclipse.team.core.subscribers.RemoteBytesSynchronizer
A remote bytes sychronizer is a remote synchronizer that caches the remote sync bytes using the org.eclipse.core.resources.ISynchronizer. It also has API that differentiates the case of no existing remote for a local resource from that of the remote state never having been queried for that local resource.
Field Summary | |
protected QualifiedName |
syncName
|
Constructor Summary | |
RemoteBytesSynchronizer(QualifiedName name)
|
Method Summary | |
void |
dispose()
Dispose of any cached sync bytes. |
byte[] |
getSyncBytes(IResource resource)
Return the remote sync bytes cached for the given local resource. |
protected ISynchronizer |
getSynchronizer()
|
protected QualifiedName |
getSyncName()
|
boolean |
hasRemote(IResource resource)
Return whether the given resource has a corresponding remote resource that is known to exist (at the last point in time that a refresh was performed). |
boolean |
isRemoteKnown(IResource resource)
Return true if the remote resources associated with the given local resource has been fetched. |
boolean |
removeSyncBytes(IResource resource,
int depth)
Remove the remote bytes cached for the given local resource. |
protected boolean |
setRemoteDoesNotExist(IResource resource)
This method should be invoked by a client to indicate that it is known that there is no remote resource associated with the local resource. |
boolean |
setSyncBytes(IResource resource,
byte[] bytes)
Set the remote sync bytes for the given resource. |
Methods inherited from class org.eclipse.team.core.subscribers.RemoteSynchronizer |
getRemoteResource, refresh |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected QualifiedName syncName
Constructor Detail |
public RemoteBytesSynchronizer(QualifiedName name)
Method Detail |
public void dispose()
protected ISynchronizer getSynchronizer()
protected QualifiedName getSyncName()
public byte[] getSyncBytes(IResource resource) throws TeamException
null
can mean either that the
remote has never been fetched or that it doesn't exist. The method
isRemoteKnown(IResource)
should be used to differentiate
these two cases.
TeamException
public boolean setSyncBytes(IResource resource, byte[] bytes) throws TeamException
null
. If it is known that the remote does not exist,
setRemoteDoesNotExist(IResource)
should be invoked. If the sync
bytes for the remote are stale and should be removed, removeSyncBytes()
should be called.
resource
- bytes
-
true
if the sync bytes changed
TeamException
public boolean removeSyncBytes(IResource resource, int depth) throws TeamException
isRemoteKnown(resource)
will return false
and getSyncBytes(resource)
will return null
for the
resource (and potentially it's children depending on the value of the depth parameter.
true
if there were bytes present which were removed
TeamException
public boolean isRemoteKnown(IResource resource) throws TeamException
true
) or the remote has not been fetched (i.e. this method returns
false
).
TeamException
protected boolean setRemoteDoesNotExist(IResource resource) throws TeamException
isRemoteKnown(resource)
will return true
and
getSyncBytes(resource)
will return null
.
true
if this changes the remote sync bytes
TeamException
public boolean hasRemote(IResource resource) throws TeamException
RemoteSynchronizer
hasRemote
in class RemoteSynchronizer
resource
- the local resource handle
true
if a corrrespondin remote resource is know to exist
TeamException
|
Eclipse Platform Pre-release 3.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |